package xcmg.device.dao.mapper.agent;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import xcmg.device.dao.entity.agent.ServiceStaffQuotaDO;
import xcmg.device.service.vo.agent.ServiceStaffQuotaQueryVO;
import xcmg.device.service.vo.agent.ServiceStaffQuotaVO;
import yb.ecp.fast.infra.infra.PageCommonVO;
import yb.ecp.fast.infra.infra.SearchCommonVO;

import java.util.List;


/**
 * 服务人员额度表 Mapper
 * @author huhuawei
 */
@Mapper
public interface ServiceStaffQuotaMapper {

    List<ServiceStaffQuotaDO> list(ServiceStaffQuotaVO condition);


    /**关联用户角色查询人员额度，用于界面展示
     * @param condition
     * @return
     */
    List<ServiceStaffQuotaDO> queryList(ServiceStaffQuotaQueryVO condition);

    int insert(ServiceStaffQuotaDO model);

    int merge(ServiceStaffQuotaDO model);

    int updateByPrimaryKeySelective(ServiceStaffQuotaDO bean);

    int deleteByPrimaryKeySelective(String id);


    ServiceStaffQuotaDO itemByUserId(String staffId);

    ServiceStaffQuotaDO itemByUserName(@Param("staffName") String staffName);

    int countIsDisable(@Param("staffName") String staffName);

    int countIsDisableByStaffId(@Param("staffId") String staffId);
}
